#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int n, i;
    int tmp = 0;
    float sum = 0;
    int s = 1;
    scanf("%d", &n);
    for (i = 1; i <= n; i++)
    {
        tmp += s * (2 * i - 1);
        sum += 1.0 / tmp;
        s = -s;
    }
    printf("%.3f", sum);
    return 0;
}